export default{
  namespaced:true,
  state:{
   
    isShowToast:false,
    toastMsg:'',
    toastType:'',
  },
  mutations:{
    changeIsShowToast(state,payload){
      state.isShowToast=payload.isshow;
      if(payload.isshow){
        state.toastMsg=payload.msg;
        state.toastType=payload.type
      }
    }
  }
  ,actions:{
    asyncchangeIsShowToast(context,payload){
      console.log('asyncchangeIsShowToast')
      context.commit('changeIsShowToast',payload)
      setTimeout(()=>{
        context.commit('changeIsShowToast',{
          isshow:false
        })
      },1500)
    }
  }
}